package cn.edu.zust.se.api.enums;

import lombok.Getter;
/**
 * 用户状态枚举类 0-正常 1-冻结
 */
@Getter
public enum UserStatusEnum {
    NORMAL(0, "正常"),
    BANNED(1, "冻结");

    UserStatusEnum(int code, String msg) {
    }
    private int code;
    private String msg;
    public static UserStatusEnum getEnumByCode(int code) {
        for (UserStatusEnum value : UserStatusEnum.values()) {
            if (value.getCode() == code) {
                return value;
            }
        }
        return null;
    }
}
